package com.tm.d1_api_object;

/**
 * 2024/5/23 重写Clone方法 Cjj
 */
public class Test2 {
    public static void main(String[] args) throws CloneNotSupportedException {
        User user = new User(1,"成","123",new double []{66.7});
        System.out.println(user.getId());
        System.out.println(user.getName());
        System.out.println(user.getPassword());
        System.out.println(user.getScores());


        User clone = (User) user.clone();
        System.out.println(clone.getId());
        System.out.println(clone.getName());
        System.out.println(clone.getPassword());
        System.out.println(clone.getScores());
    }
}
